<?php
	if ($action['xpath']) {
		$targets = $xpath->query($action['xpath']);
	} else {
		$targets = array($tag);
	}
	foreach ($targets as $target) {
		$target->setAttribute($action['name'], $action['value']);
	}
?>